package com.huangjue.backend.service;

import com.huangjue.backend.entity.Demo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DemoService {
    List<Demo> getDemosByCourseId(Integer courseId);

    int getDemosNum(Integer courseId);

    /**
     * 根据demoId获取courseId
     */
    Integer getCourseIdByDemoId(@Param("demoId") Integer demoId);
    
    /**
     * 更新课程完成状态
     */
    int updateCourseFinished(Integer userId, Integer courseId);

    Integer updateOpenNum (Integer demoNum, Integer userId, Integer courseId);

}